home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / TSPA3340.ZIP / TSUNTBOT.TST < prev    next >
Text File  |  1993-07-26  |  1KB  |  68 lines

  1. {$M 16384,0,655360}
  2.  
  3. (* This is a test program for the TSUNTBOT.TPU unit
  4.    Updated 26-Jul-93
  5. *)
  6.  
  7. uses Dos,
  8.      TSUNTG,   (* TSUNTBOT.TPU does not need, just TSUNTBOT.TST *)
  9.      TSUNTBOT;
  10.  
  11. procedure LOGO;
  12. begin
  13.   writeln;
  14.   writeln ('TSUNTBOT unit test by Prof. Timo Salmi');
  15.   writeln ('University of Vaasa, Finland, ts@uwasa.fi');
  16. {$IFDEF VER40}
  17.   writeln ('TP version 4.0');
  18. {$ENDIF}
  19. {$IFDEF VER50}
  20.   writeln ('TP version 5.0');
  21. {$ENDIF}
  22. {$IFDEF VER55}
  23.   writeln ('TP version 5.5');
  24. {$ENDIF}
  25. {$IFDEF VER60}
  26.   writeln ('TP version 6.0');
  27. {$ENDIF}
  28. {$IFDEF VER70}
  29.   writeln ('TP version 7.0');
  30. {$ENDIF}
  31.   writeln;
  32. end;
  33.  
  34. (* Try warm reboot *)
  35. procedure TEST1;
  36. var ch : char;
  37. begin
  38.   write ('Press Y if you really want to test a warm reboot, any other key to cancel ');
  39.   repeat
  40.     if KEYPREFN then
  41.       begin
  42.         ch := READKEFN;
  43.         case ch of
  44.           #3       : exit;
  45.           #27      : exit;
  46.           #0       : begin
  47.                        if KEYPREFN then
  48.                          begin
  49.                            ch := READKEFN;
  50.                            exit;
  51.                          end;
  52.                      end;
  53.           'Y', 'y' : REBOOT(true);
  54.           #0..#255 : exit;
  55.           else     ;
  56.         end; {case}
  57.       end; {if}
  58.   until false;
  59. end;  (* test1 *)
  60.  
  61. (* Main program *)
  62. begin
  63.   LOGO;
  64.   TEST1;
  65.   {}
  66.   write ('Press <-'' '); readln;
  67. end.  (* tsuntbot.tst *)
  68.